home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / moon.doc < prev    next >
Text File  |  1995-03-31  |  4KB  |  89 lines

  1. (Comp.sys.handhelds) 
  2. Item: 315 by fin at norge.unet.umn.edu 
  3. Author: Craig A. Finseth 
  4.   Subj: HP-48SX Program to Calculate/Show the Phase of the Moon 
  5.   Date: Wed Apr 04 1990 16:14  
  6.  
  7. [Note: See MOON2 for an improved version.  -jkh-] 
  8.  
  9. In order for bugs to depend on the phase of the moon, they must first 
  10. be able to find out what the phase of the moon is.  This program 
  11. should help. 
  12.  
  13. Note: this program uses a first-order sine approximation.  The correct 
  14. expression contains about 30 sine terms.  Still, what you see displayed 
  15. corresponds reasonably well with what you see in the sky... 
  16.  
  17. MPHASE  Calculate and show the phase of the moon for the current date/time 
  18. MTIME   Calculate and show the moon time string for the current date/time 
  19. MFRAC   Calculate the moon phase fraction (0 new moon; .25 first quarter; 
  20.         .5 full moon; .75 last quarter) 
  21. FLIP    Invert the screen.  Fast, but displays garbage during the flip. 
  22. MPLOT   Internal to MPHASE: Plot the crescent 
  23. MLINE   Internal to MPHASE: Draw a line of the crescent 
  24.  
  25. Notes: 
  26.  
  27. - If you want to generalize the date/time calculated for, change MFRAC. 
  28.  
  29. - You can omit the flip by removing the call to FLIP from MPHASE. 
  30.  
  31. - The base time for new moon is 12 Jan 1975 at 10:21 am GMT (4:21 
  32.   AM CST, which is the figure used in the program). 
  33.  
  34. - The moon cycle is assumed to be 42,532 minutes long. 
  35.  
  36. Checksum: #3794h 
  37. Size: 1153.5 
  38.  
  39. Craig A. Finseth              fin@unet.umn.edu [CAF13] 
  40. University Networking Services          +1 612 624 3375 desk 
  41. University of Minnesota            +1 612 626 1002 FAX 
  42. 130 Lind Hall, 207 Church St SE, Minneapolis MN 55455-0134, U.S.A. 
  43. ------------------------------------------------------------------------------- 
  44.   Resp: 1 of 1 by prestonb at hpcvra.CV.HP.COM 
  45. Author: Preston Brown 
  46.   Date: Fri Apr 06 1990 16:49  
  47.  
  48. If you don't want to glitch the display then change FLIP to: 
  49.  
  50. FLIP 
  51. \<< PICT PICT RCL NEG {#0 #0} SWAP REPL \>> 
  52.  
  53. This version is also faster. 
  54.  
  55. Preston 
  56. ------------------------------------------------------------------------------- 
  57. (Feedbackto.hp) Main: r 
  58. Item: 16 by _davidmotto at hpcvbbs.UUCP 
  59. Author: David G Motto 
  60.   Subj: HP-48SX Date command 
  61.   Keyw: date hp-48 
  62.   Date: Sun Apr 08 1990 05:57  
  63.  
  64. How come I can't set the "date" on my 48SX to a date in the far 
  65. past?  I input the "Moon phase" programs, and I want to see the  
  66. phase of the moon when I was born.  No, it wasn't before Oct 15, 
  67. 1582!  Where does it say what the range of "date settings" can 
  68. be?  Can the "Moon phase" program be rewritten to use previous 
  69. dates? (It is in user.programs). 
  70. ------------------------------------------------------------------------------- 
  71.   Resp: 1 of 1 by meghas at hpcvbbs.UUCP 
  72. Author: Megha Shyam 
  73.   Date: Tue Apr 17 1990 11:00  
  74.  
  75.    Hello David: 
  76.  
  77.    In the TIME application, you are correct in discovering that you 
  78.    set the date of the HP 48SX to any arbitrary date.  In fact there  
  79.    is only a finite range (Jan 1, 1989 to Dec 31, 2088).  This is not 
  80.    indicated anywhere in the manual unfortunately.  We had to make some 
  81.    choices when working in this area: number of days calculation between 
  82.    two given dates does accept a wide range of dates; however to set a  
  83.    date to a given value we had to truncate it to only a 100 year  
  84.    range and we choose the starting point as Jan 1, 1989.  Thus the 
  85.    "Moon Phase" program rewrite is very tedious and cumbersome. 
  86.  
  87.    Megha Shyam 
  88.    Hewlett-Packard 
  89.